/**
 * @Date 2023-02-10 18:55:55
 * @Remark
 */

// ROOT管理员账户ID
export const ROOT_ADMIN_USER_ID = "1";
// 路由模式
export const ROUTE_MODE: "static" | "dynamic" = "dynamic"; // 静态就显示全部路由不做控制,动态就根据账户返回的状态控制
// 主视图路由前缀
export const ROUTE_MAIN_VIEW = "main";
export const ROUTE_LOGIN_VIEW = "login";
export const ROUTE_REGISTER_VIEW = "register";
// 快速添加菜单
export const QUICK_ADD_MENUS = false;
// 图片尺寸限制,单位MB
export const UPLOAD_SETTING = {
  IMAGE_SIZE: 2,
  VIDEO_SIZE: 10,
};
// TextArea
export const TEXTAREA_PROPS = {
  autoSize: { minRows: 5, maxRows: 10 },
  allowClear: true,
};
// detail
export const DETAIL_STYLE = {
  // Form.Item
  FORM_4_10: {
    colon: false,
    labelCol: {
      span: 4,
    },
    wrapperCol: {
      span: 10,
    },
  },
};
// modal
export const MODAL_STYLE = {
  // 宽度
  COL1: 480,
  COL2: 800,
  COL3: 1000,
  // Form.Item
  FORM_2_10: {
    colon: true,
    labelCol: {
      span: 2,
    },
    wrapperCol: {
      span: 10,
    },
  },
  FORM_4_10: {
    colon: true,
    labelCol: {
      span: 4,
    },
    wrapperCol: {
      span: 10,
    },
  },
  FORM_4_18: {
    colon: true,
    labelCol: {
      span: 4,
    },
    wrapperCol: {
      span: 17,
    },
  },
  FORM_6_15: {
    colon: true,
    labelCol: {
      span: 6,
    },
    wrapperCol: {
      span: 15,
    },
  },
  FORM_6_18: {
    colon: true,
    labelCol: {
      span: 6,
    },
    wrapperCol: {
      span: 18,
    },
  },
  FORM_8_16: {
    colon: true,
    labelCol: {
      span: 8,
    },
    wrapperCol: {
      span: 16,
    },
  },
  FORM_10_14: {
    colon: true,
    labelCol: {
      span: 10,
    },
    wrapperCol: {
      span: 14,
    },
  },
  FORM_24: {
    column: 1,
  },
  FORM_ROW_GUTTER: 5,
};
// 页码通用设置
export const TABLE_PAGINATION = {
  showTotal: (total: number, range: number[]) => {
    return `${total} 条记录中的 ${range[0]}-${range[1]} 条`;
  },
  showSizeChanger: true,
  showQuickJumper: true,
  pageSizeOptions: [2, 15, 25, 50, 100],
};
// 本地存储
export const LOCAL_ACCOUNT = "account";
export const LOCAL_AUTH = "htua";
